<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.org/ui" template="../../index.xhtml"
                xmlns:c="http://java.sun.com/jsp/jstl/core"
                xmlns:f="http://xmlns.jcp.org/jsf/core">

    <ui:define name="content">
        <!--Desenvolver Formularios dos cestos de açai-->
        <h:form id="formularioCesto">
            <p:growl
                id="growl"
                showDetail="true"
                sticky="false"/>

            <div align="center">

                    <p:panel header="Cesto açai">
                        <h:inputHidden value="#{cestoAcaiBean.cestoAcai.id}"/>

                        <h:panelGrid columns="2" style="margin-bottom:10px" cellpadding="5" columnClasses="label, value">

                            <h:outputText value="Origem"/>
                            <p:inputText value="#{cestoAcaiBean.cestoAcai.origem}"/>

                            <h:outputText value="Quantidade"/>
                            <p:inputText value="#{cestoAcaiBean.cestoAcai.quantidade}"/>

                            <h:outputText value="Data"/>
                            <p:calendar value="#{cestoAcaiBean.cestoAcai.data}"
                                        id="button" showOn="button">
                                <f:convertDateTime pattern="dd/MM/yyyy"/>
                            </p:calendar>

                            <h:outputText value="Tipo Cesto"/>
                            <p:selectOneRadio value="#{cestoAcaiBean.cestoAcai.tipo}">
                                <f:selectItem itemLabel="Paneiro" itemValue="Paneiro"/>
                                <f:selectItem itemLabel="Caixa" itemValue="Caixa"/>
                                <f:selectItem itemLabel="Saca" itemValue="Saca"/>
                            </p:selectOneRadio>

                        </h:panelGrid>
                        <br/>

                        <div align="center">
                            <p:menuButton value="Opções">
                                <p:menuitem value="Salvar" action="#{cestoAcaiBean.salvar()}" update="growl" icon="ui-icon-disk"/>
                                <p:menuitem value="Cancelar" action="#{cestoAcaiBean.cancelar()}" update="growl" icon="ui-icon-arrowrefresh-1-w"/>
                                <p:separator />
                                <p:menuitem value="Voltar Página Inicial" url="../../index.xhtml" icon="ui-icon-extlink"/>
                            </p:menuButton>
                        </div>
                    </p:panel>
            </div>
        </h:form>
    </ui:define>
</ui:composition>
